package com.atguigu.java.ai.langchain4j;

import com.atguigu.java.ai.langchain4j.assistant.YuJieAssistant;
import dev.langchain4j.community.model.dashscope.QwenChatModel;
import dev.langchain4j.service.AiServices;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class test1 {
    @Autowired
    private QwenChatModel qwenChatModel;
    @Test
    public void testChat() {
        YuJieAssistant yuJieAssistant = AiServices.create(YuJieAssistant.class, qwenChatModel);
        String answer = yuJieAssistant.ask("代派不老铁");
        System.out.println(answer);

    }
}
